package com.he.hsdyc.designmodule.factory.standard;

import com.he.hsdyc.designmodule.factory.simple.MailSender;
import com.he.hsdyc.designmodule.factory.simple.Sender;
import com.he.hsdyc.designmodule.factory.simple.SmsSender;

public class SendFactory {

    public Sender produceMail(){
        return new MailSender();
    }

    public Sender produceSms(){
        return new SmsSender();
    }





    /**
     * 功能描述: 静态工厂模式 ------------推荐使用，不需要创建实例，直接调用即可
     * @date: 2019/8/5
     */
    public static Sender produceMailStatic(){
        return new MailSender();
    }

    public static Sender produceSmsStatic(){
        return new SmsSender();
    }
}
